package cn.tedu.oop;
/**本类用于面向对象巩固练习*/
public class TestPhone {
    public static void main(String[] args) {
       Phone2 p1 = new Phone2();

        p1.call();
        p1.video();
        p1.brand="小米";
        p1.price = 888;

        System.out.println(p1.brand);
        System.out.println(p1.price);



    }

}
//1.定义类
class Phone2{
    //2.定义属性
    String brand;
    double price;

    //定义方法
    public void call(){
        System.out.println("正在打电话");
    }
    public void video(){
        System.out.println("正在看直播");
    }
}
